package com.sansi.bleFloodlight.utils;

import android.view.animation.Animation;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.ImageView;

public class ObjectAnimationUtil {

    public static Animation getAnimatorRotateAchievements(ImageView imageView) {
        Animation rotate = new RotateAnimation(0f, 359f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
        LinearInterpolator lin = new LinearInterpolator();
        rotate.setInterpolator(lin);
        rotate.setDuration(2000);
        rotate.setRepeatCount(Animation.INFINITE);
      //  rotate.setRepeatMode(Animation.REVERSE);
        rotate.setFillAfter(true);
        imageView.setAnimation(rotate);

        return rotate;
    }
}
